Introduction BTRV copyright (C) 1992 by Richard W. Hansen, all rights reserved. Btrieve and Butil are a copyrighted by Novell, Inc. BTRV is a utility program for maintaining and creating files using the Btrieve record manager from Novell,Inc. BTRV was created primarily as an aid for programmers developing Btrieve applications, but can be invaluable to anyone who uses or maintains Btrieve files. Some of BTRV's features are: * Easy file creation. * Supports all key and file types. * Supports variable length records. * Browse and edit files. * Clone files. * Recover damaged file. * Load and Save files in Butil format. * Calculate optimum page sizes. * Test record locking and transaction processing. * View file statistics. * Get record positon/Read record by position Definition Of Shareware Shareware distribution gives users a chance to try software before buying it. If you try a Shareware program and continue using it, you are expected to register. Individual programs differ on details -- some request registration while others require it, some specify a maximum trial period. With registration, you get anything from the simple right to continue using the software to an updated program with printed manual. Copyright laws apply to both Shareware and commercial software, and the copyright holder retains all rights, with a few specific exceptions as stated below. Shareware authors are accomplished programmers, just like commercial authors, and the programs are of comparable quality. (In both cases, there are good programs and bad ones!) The main difference is in the method of distribution. The author specifically grants the right to copy and distribute the software, either to all and sundry or to a specific group. For example, some authors require written permission before a commercial disk vendor may copy their Shareware. Shareware is a distribution method, not a type of software. You should find software that suits your needs and pocketbook, whether it's commercial or Shareware. The Shareware system makes fitting your needs easier, because you can try before you buy. And because the overhead is low, prices are low also. Shareware has the ultimate money-back guarantee -- if you don't use the product, you don't pay for it. Disclaimer Users of BTRV must accept this disclaimer of warranty: "BTRV is supplied as is. The author disclaims all warranties, expressed or implied, including, without limitation, the warranties of merchantability and of fitness for any purpose. The author assumes no liability for damages, 1 direct or consequential, which may result from the use of BTRV." License Agreement BTRV is a "Shareware program" and is provided at no charge to the user for evaluation. Feel free to share, but please do not give it away altered or as part of another system. If you find this program useful and find that you are using BTRV and continue to use BTRV after a reasonable trial period, you must make a registration payment of $50.00 to Richard Hansen. The $50.00 registration fee will license one copy for use on any one computer at any one time, site licenses are available. You must treat this software just like a book. Each licensed copy may be used by only one person at a time, just as a book cannot be read by two different persons at the same time. Commercial users of BTRV must register and pay for their copies of BTRV within 30 days of first use or their license is withdrawn. Site license arrangements may be made by contacting Richard Hansen. Anyone distributing BTRV for any kind of remuneration must first contact Richard Hansen for authorization. How to Register and Get Help To register, fill out a registration form and send $50.00 U.S. (non U.S. registrations add $3.00) for each copy being registered. For your registration you will receive the latest version and complete printed documentation. If you have any suggestions, problems, or questions please contact me. Richard Hansen PO Box 18571 St. Paul MN 55118-0571 USA On the CompuServe Information Service at User ID : 70242,3367 Installation The file "BTRV.EXE" is the only one you need. BTRV will create its configuration file, "BTRV.CFG", in the same directory as the BTRV program. Requirements BTRV requires DOS 3.0 or greater and a minimum of 256K bytes of memory plus the memory your configuration of Btrieve needs. BTRV will run on any monochrome or color monitor. Since BTRV uses a text based windowing and pull down menu environment, use of a mouse is strongly recommended. BTRV should work with any version of Novell's Btrieve, and supports most functions through version 5.10. It supports all file, record, and key types; including data only files and variable length records. You may create files with up to 24 segments, and can view files by any defined index path. 2 Getting Started This documentation is not intended as a tutorial on Btrieve, that is a subject of it's own. I hope that this documentation will serve as a thorough instruction in BTRV and its uses. To start the program, you must first load Btrieve. A batch file, that loads the Btrieve Record manager and then BTRV, is the most convenient method. To ensure that you can open any file, it is best to start Btrieve with a page size of the maximum 4096 bytes. If you want a file opened automatically, you can enter a path and filename on the command line. If you don't load a file from the command line, choose the Open option from the File menu. Type in a path and filename or use the Tab key to move to the file list box and choose a file. When you have typed in a filename or highlighted one in the list box, press Enter or click on the Open button with the mouse. Once you have opened a file, pull down the View menu. From the View menu you can view various aspects of the current file. You may check the file statistics, view the data in the file records, or view the key buffer for the current record. In addition, you can browse through a window that displays the key fields defined for each record in the file. Basics for Using BTRV When you start BTRV you will see a screen like the one below. At the top is the menu bar. At the right end of the menu bar is a clock that displays the current system time. To the left of the clock is a display of the free bytes of system memory. At the bottom of the screen is a status line that displays a few of the most commonly used hot key combinations. Between the menu bar and the status line is the desktop. The desktop is where all windows and dialog boxes will be opened and displayed. All program functions are accessed from the main program menu. In addition, many functions have hot key combinations (see Appendix A) that can be used to invoke them. If you have a mouse, there are several functions available by clicking the mouse in the status line at the bottom of the screen. A mouse is the easiest way to operate the program. Any option or program operation, except those that require character entry, such as file owner name, can be executed with a mouse. If you are familiar with Microsoft Windows, you should have no difficulty using BTRV with a mouse. If you are using the keyboard, pressing F10 will move you to the menu bar. You can also type Alt and the first letter of the desired menu bar option, such as Alt-V for the View menu or Alt-F for the File menu. To Exit the program you can press Alt-X, select Exit from the File menu, or click the mouse on "Alt-X Exit" in the status line. 3 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ File Input Output View Locks Window Misc 321232 09:18p³ ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ ³ ³ Open... Ctrl-O ³ ³ ³ ³ Create... ³ ³ ³ ³ Clone... ³ ³ ³ ³ Recover... ³ ³ ³ ³ Load... ³ ³ ³ ³ Save... ³ ³ ³ ³ Close Ctrl-C ³ ³ ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³ ³ ³ Set Owner ³ ³ ³ ³ Clear Owner ³ ³ ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³ ³ ³ Unload Btrieve ³ ³ ³ ³ Reset Btrieve ³ ³ ³ ³ Exit Alt-X ³ ³ ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³Alt-X Exit Ctrl-Home First Ctrl-End Last Ctrl-N Next Ctrl-P Prev ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ Figure 1 - BTRV opening screen Dialog Boxes BTRV receives user input in dialog boxes. Only one dialog box may be open at a time. When you open a dialog box, one of the buttons will be highlighted in some manner, depending on your color setup. This button is the default and will be executed if you press Enter. Enter does not move from field to field, use Tab and Shift-Tab or the mouse for that. Every dialog box has an OK button (or some equivalent such as Open) and a Cancel button. You can back out of any operation, from almost any point, by pressing Escape or selecting the Cancel button. When you press Enter, with the OK button as the default or highlighted button, whatever data you have in the dialog box will be used. Dialog boxes also have close or cancel icons embedded in the upper left corner of the window frame. Clicking on the cancel icon with the left mouse button, will close the window or dialog. If you are using the keyboard you can press Escape to cancel a dialog box. Dialog boxes will contain a variety of controls, from scrolling list boxes to check boxes and radio buttons. Each control will have an attached label that describes its purpose. Pressing the highlighted letter in the label, or clicking on the label or control will move you to that control. To jump to a new control from a text input line you will must press Alt and the highlighted letter in the label. 4 Check Boxes and Radio Buttons Check boxes are used to select one or more items from a list of items. Radio buttons are used to select a single item from a list. In groups of check boxes or radio buttons the arrow keys move you between the different choices. In a check box group you may mark multiple items with the space bar. In a group of radio buttons you can select only one of the items, by moving through the group with the arrow keys. Input Lines Where keyboard data entry is required, a dialog box will contain a text input line. When you first enter an input line all existing text will be highlighted. Typing any alphanumeric character will delete the current text and replace it with what was just typed. To edit existing input press the left or right arrow key, Home, End or Insert first, or click the mouse on the desired position in the text. With a mouse, press and hold the left button while moving the mouse to highlight text for deletion. Press the Delete key to remove the highlighted text. If the text you have typed is to long to display in the input line, the text will scroll left and right in the input line. You will see left and right arrow icons at the start or end of the input line. Press the left or right arrow keys, or click the mouse on one of the icons, to scroll the text. Many text input lines will have history lists attached to them. If an input line has an icon next to it, you may press the down arrow key or click on the icon to view the history list. Double click the mouse or press Enter on the highlighted item to place it into the input line. Windows BTRV uses text windows to display data. You may have multiple data windows open at the same time. When there are multiple windows open, clicking on any part of a window will move it to the front. To close a window click on the close icon in the upper left corner or press the F4 key. You can resize a window by pressing and holding the left mouse button down on the lower right corner of the window. With the mouse button held down, drag the window corner until the window is the desired size. Alternately, you can press Ctrl-F5 and use the arrows keys, while holding down a shift key. Press Escape or Enter when done resizing a window with the arrow keys. To move a window, press and hold the left mouse button down on any part of the top window frame and drag the window to a new position. From the keyboard press Ctrl-F5 and use the arrow keys, press Escape or Enter when done. To zoom or unzoom a window, click the mouse cursor on the zoom icon located in the upper right corner of the window frame. Double clicking on the top of the window frame will also zoom or unzoom a window. From the keyboard you should press the F5 key. 5 Scroll Bars In list boxes, history lists, or text windows there may be horizontal and vertical scroll bars. In this case you may use the arrow keys, Page Up and Page Down to scroll the data. Home will move to the top of the window, End to the bottom. Page Up and Page Down move by one page, while Ctrl-Page Up and Ctrl-Page Down move to top and bottom of the list. With a mouse, click on the Up or Down arrow icons to scroll the data one line at a time. You may also click below or above the position indicator icon, in the scroll bar, to scroll by one page. Optionally, you may hold down the left mouse button on the position icon and drag the icon to reposition the data. File Menu Options The File menu contains all the file related options in BTRV. You can open, create, clone, recover, load, or save a file. In addition, you can set or clear file owner names, unload and reset the Btrieve Record Manager. PLEASE NOTE: Early versions of Btrieve (prior to 5.0) have no protection against overwriting existing files. Be careful not to enter the name of an existing file when entering the new filename for the create, recover, or clone operations. Opening a File You can have only one file open at a time, multiple files is a feature for some future version. If you already have a file open, this option is disabled until you close the current file. You open a file from the File menu or by pressing Ctrl-O. ÉÍ[*]ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ Open File ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» º File Owner º º [*.* ] [ ] º º º º Directory Open Mode º º [C:\TP\B\ ] (*) Normal º º ( ) Accelerate º º Files Directories ( ) Read Only º ºÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ( ) Verify º º³ B.BAT # ..\ # ( ) Exclusive º º³ BAK.BAT º TEST\ º º º³ BT.BAT º A:\ º º º³ BTRIEVE.TPU º B:\ º º º³ BTRIEVE.TRN º C:\ º [ Open ]Ü º º³ BTRV.ASC º º ßßßßßßßß º º³ BTRV.CFG º º º º³ BTRV.DOC º º [Cancel]Ü º º³ BTRV.EXE º º ßßßßßßßß º º³ BTRV6.PAS º º º ºÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ º º B.BAT 46 02/28/1992 07:08pm º ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ Figure 2 - Open File Dialog Box 6 To open a file you will be working in the Open File dialog box as seen above. You may type in a full path and filename, a file mask with wild card characters or use the file selection list. There is also a history list attached to the filename input that can be used to retrieve previously used filenames or masks. The file you open can be on any drive or in any directory. Use the directories list box to switch drives or directories. Highlight a drive or directory. Next press Enter, double click on it with the mouse, or press the Open button to switch to the directory or drive. The files in the current directory will be displayed in the files list box. Just highlight a file, then press Enter, double click on it with the mouse, or press the Open button to open it. Both the file and directory list boxes will do incremental searches. When you are in one of the boxes, type as many letters as needed to reach a desired file. Use the Backspace key to remove letters and backup in your search. If a file has been setup with an owner name, you will need to specify that name to open the file. The owner name must exactly match the one previously assigned to that file (please see your Btrieve manual for more information). There is also a set of radio buttons that can be used to set the open mode. The standard Btrieve modes are summarized below, Normal is the default mode. ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Mode Description ³ ³ Normal The default mode, no special features. ³ ³ Accelerate Disables Btrieve's data recovery features. ³ ³ Read Only Allows access to a damaged file. ³ ³ Verify Enables DOS verify option. ³ ³ Exclusive Gives the workstation exclusive access to a file. ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ Table 1 - Btrieve File Open Modes Creating a File The create file dialog allows you to specify all of a file's attributes. You can specify any characteristics available for Btrieve files. Three pieces of information must be entered, the filename, the record length, and the file page size. In addition you may add an alternate collating sequence, set any special file flags, set the number of data pages to preallocate to the file, and the free space threshold the file should maintain. 7 É[*]ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ Create File ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» º File Name and Path File Flags º º[ ] [ ] Variable Length Records º º [ ] Blank Truncation º º Alt Collating Sequence [ ] Data Compression º º[ ] [ ] Key Only º º º º Page Size Record Size [0 ] Free Space º º (*) 512 Bytes (*) 0 % º º ( ) 1024 Bytes PreAllocate [0 ] ( ) 10 % º º ( ) 1536 Bytes ( ) 20 % º º ( ) 2048 Bytes ( ) 30 % º º ( ) 2560 Bytes º º ( ) 3072 Bytes º º ( ) 3584 Bytes [ Create ]Ü [ Cancel ]Ü [ Define Keys ]Ü º º ( ) 4096 Bytes ßßßßßßßßßß ßßßßßßßßßß ßßßßßßßßßßßßßßß º ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ Figure 3 - Create File Dialog Box When you have defined the file's attributes, press the Define Keys button. This will bring up a dialog box, as seen below, for defining the first key in the file. In this dialog you will set the key type, key attributes, key size, key position in the record and the key's null value. You must set the key type, position and length, all other information is optional. ÉÍ[*]ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ Key Segment #1 ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» º Key Type Key Attributes º º (*) String [ ] Duplicate º º ( ) Integer [ ] Modifiable º º ( ) Float [ ] Null º º ( ) Date [ ] Segmented º º ( ) Time [ ] Alt Collating Sequence º º ( ) Decimal [ ] Descending º º ( ) Money [ ] Manual º º ( ) Logical º º ( ) Numeric Position [0 ] º º ( ) BFloat º º ( ) LString Key Length [0 ] º º ( ) ZString º º ( ) Unsigned Binary Null Value [0 ] º º ( ) Auto Increment º º º º [ OK ]Ü [ Cancel ]Ü [ Next Key ]Ü [ Prev Key ]ܺ º ßßßßßß ßßßßßßßßßß ßßßßßßßßßßßß ßßßßßßßßßßßߺ ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ Figure 4 - Define Keys Dialog Box You may define up to 24 keys or key segments. When you are done with a key, press the Next Key button to define another key, or press the Prev Key button to go back to the previous key definition. When all the keys have been defined press the OK button to return to then main file create dialog. In the main dialog press the Create button to create your new file. Note that the file is not open after it is created. 8 If you need more information on file attributes or defining keys please refer to your Btrieve manual. Cloning a File Clone will create an empty copy of a file. The cloned file will have attributes identical to the original file, but will be empty. First, you must select the file to be cloned. This is done in the dialog box shown below. You may type a full path name or select one from the list of files. If the file has an owner, it must be specified in the Owner field. Press the Open button when you have a file selected. A second dialog box will open. Here you must type the name of the new file and press the OK button to clone the file. ÉÍ[*]ÍÍÍÍÍÍÍÍÍÍÍÍÍÍ File to Clone ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ» º File Owner º º [*.* ] [ ] º º º º Directory º º [C:\TP\B\ ] º º º º Files Directories º ºÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ º º³ B.BAT # ..\ # º º³ BAK.BAT º TEST\ º º º³ BT.BAT º A:\ º º º³ BTRIEVE.TPU º B:\ º º º³ BTRIEVE.TRN º C:\ º [ Open ]Ü º º³ BTRV.ASC º º ßßßßßßßß º º³ BTRV.CFG º º º º³ BTRV.DOC º º [Cancel]Ü º º³ BTRV.EXE º º ßßßßßßßß º º³ BTRV.PAS º º º ºÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ º º B.BAT 46 02/28/1992 07:08pm º ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ Figure 5 - Clone File Dialog Box Recovering A File This option will read all records from one Btrieve file and copy them to a new Btrieve file. You can use it to recover records from damaged files. Recover can also be used to compact a file, by creating a copy with all deleted records removed. First, you must select the file to be recovered. This is done in a dialog box identical to the one for file cloning. In a second dialog box you will enter the name for the new file. Loading A File Load will read a DOS file created by the Save operation described below, or the Butil Save or Recover operations. Load inserts all records from a DOS file into a Btrieve file. Load works identically to the Butil Load operation. 9 First, you select the file that will have records loaded into it. This is done in a dialog box identical to the one for file cloning. In a second dialog box you select the DOS file to be loaded. Saving A File Use Save to create a file to for use with Load or Butil. First, you select the file to be saved. This is done in a dialog box identical to the one for file cloning. In a second dialog box you will enter the name for the DOS file that records will be saved to. Set Owner This option is disabled unless you have a file open. Use it to add an owner name to the file. An owner name can be up to eight characters in length. Once you set an owner name, you will need to supply the exact same name every time you open the file. In addition, you can set the file access mode for use after the owner is set. The possible access modes are summarized below, Owner Required is the default mode. ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Mode Description ³ ³ Owner Required Requires owner name for any access. ³ ³ Read Only without Owner Permits read-only access without owner name. ³ ³ Owner Required/Encrypt Requires owner name for any access, data is ³ ³ encrypted. ³ ³ Read Only/Encrypt Permits read-only access without owner name, ³ ³ data is encrypted. ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ Table 2 - File Access Modes with Owner Clear Owner This option is disabled unless you have a file open. Use this option to remove a owner name from a file. Unload Btrieve This option executes a standard Btrieve stop or operation number 25. Needless to say, you should not pick this unless you are done using the program. Reset Btrieve The Reset option issues a operation number 28 to the record manager. Reset will close any open files, release all locks, and abort any transaction. View Menu Options The View menu gives you access to the various viewing options in BTRV. These include viewing the key buffer, record buffer, file statistics, and Btrieve version number. 10 View File Statistics ÚÄ[*]ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ File Statistics: CUSTOMER.DAT ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Record Length : 700 Record Count : 537 # ³ Page Size : 3584 Unused Pages : 0 º ³ Variable Length : No Compressed : No º ³ Key Only : No Blank Truncation: No º ³ Preallocation : No Free Threshold : º ³ Key Count : 2 Longest Key : 41 º ³ Total Segments : 2 Current Index : 0 º ³ º ³ Key Pos Size Type Dup Mod Man Alt Sup Nul Total º ³ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ º ³ 0 1 10 LString No No No No No ^ 537 º ³ 1 11 31 LString Yes Yes No Yes No ^ 532 º ³ º ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ Figure 6 - Viewing File Statistics This is a convenient way to do a quick check on a file. It lists all the information about a file that Btrieve returns. This includes the record size, page size, record count, file flags, and key definitions for each key segment defined in the file. View Data Buffer Select this option to look at the current record in a file's data buffer. This option is only available if you have a file open. The window displayed is very similar to those commonly used in disk file editors. You get two views of the data, one in ASCII characters and one in Hexadecimal notation. ÚÄ[*]ÄÄÄÄÄÄÄÄÄÄÄÄÄ Data Buffer: CUSTOMER.DAT ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³092020202020202020311E436173682053616C65³ 1 Cash Sale # ³2020202020202020202020202020202020202020³ º ³201E202020202020202020202020202020202020³ # º ³202020202020202020202020035A20201E202020³ $Z º ³2020202020202020202020202020202020202020³ º ³202020202020201E202020202020202020202020³ % º ³2020202020202020202020202020202020200F20³ ^ º ³2020202020202020202020202020000000000000³ º ³0000000000000000152830303029203030302D30³(000) 000-0º ³303030202D20303030300F472020202020202020³000 - 0000@G º ³2020202020200F20202020202020202020202020³ @ º ³2020000000000000000000000000000000000101³ @@º ³6D0701001E436173682053616C65202020202020³m^&Cash Sale º ³2020202020202020202020202020200000000000³ º ³0000000000000000000000000000000000000000³º ÀÄ Pos : 1 ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ Figure 7 - Viewing the File Data Buffer Use the Tab key to move back and forth between the two view modes (ASCII or HEX). The relative position of the cursor is maintained when you move between ASCII and HEX mode. Note the position indicator in the lower left corner. This indicator shows the position starting from one (1), just as keys must be defined when creating a file. 11 The data buffer is fully compatible with all Btrieve record types. You can view fixed length as well as variable length records. When viewing variable length records you may get a buffer length error. The default buffer size is 16K bytes, and can be set up to 64K bytes. You may decrease or increase the buffer size as desired, from the Options sub- menu under Misc on the main menu bar. Use the arrow keys, Page Up, Page Down, Ctrl-Page Up, Ctrl-Page Down to move through the data. Page Up and Page Down move one page at time. Ctrl-Page Up and Ctrl-Page Down move to the top and bottom of the buffer respectively. In addition, the scroll bar and mouse can be used. This window is used in conjunction with the file Input Options defined below. Whenever you execute one of the input options, such as Get First or Get Next, the contents of the data buffer window will be updated. If you have not already read a record before opening the window, the data buffer will be empty. You may have multiple data windows open. This can be useful for looking at different parts of large records. When you read a new record all open data windows will be updated. The contents of the buffer are fully editable. In the HEX view, you may type the characters 0 through 9 and A through F. In the ASCII view, anything you can type at the keyboard will be accepted. Any changes in one view are reflected in the other, the changes are also updated in any other open data buffer windows you may have open. If you change any data you can save the record back to the file by executing an Update operation, as described farther on in the file Output Options. You can even create new records and use the Insert operation to save them to disk. View Key Buffer View Key Buffer will give you a look at the current data in the key buffer. The data is displayed for the current access path (index). This window displays its data identically to the data buffer window above. All the movement and editing, options apply to the key buffer window as well. However, the Update and Insert operations have no effect, they work on the data in the record data buffer only. You may be wondering what good editing the key buffer can do. Well, if you do edit it, you can use the get by key operations, such as Get Equal, Get Greater, or Get Less. Admittedly, this is not the handiest way read a record by key, but it can be useful. Browse File Key Fields Use Browse to view the key fields defined for each record in a file. A scrolling window with one record per line will be displayed. The records are displayed in the order of the current key path. Every key segment can be viewed from left to right in the line. Each key segment will be displayed in a format appropriate for its defined data type. You may scroll the window, left, right, up, or down to view records or 12 parts of records that do not fit in the window. Page Up and Page Down move by one window at a time. Ctrl-Page Up and Ctrl-Page Down move to the first and last records in the file respectively. On a large file all records can not be held in memory at one time. In this case, the window will provide a sliding view of the records in the file. When you reach the first or last record in memory more records will be read in as needed. Since there is no way to quickly and reliably determine the number of active records in a Btrieve file, the scroll bars attached to the window are not accurate. They indicate the relative position in the list of records in memory, not in the file. When you hit the top or bottom the list, you will need to press the Up or Down arrow, or the Page Up or Down key, to read more records. If you have a data buffer window open, you can press the space bar to display the highlighted record in the data buffer window. With a mouse double click on a record to update the record displayed. View Btrieve Version Will display the Btrieve version number. Input Menu Options This menu controls all file input operations. From this menu you can change the index being used, and execute various Btrieve read operations. Key Path This submenu displays a list of all possible key paths for a file. It is identical to the one in the Output menu. When a file is opened, the key path defaults to key one. If a file has more than one key defined, you can choose any key to use as the index for reading records. If you change key paths while viewing records, on the next read operation you will get a Btrieve error seven, "Different Key Number". The simplest thing to do is just execute a Get First or Last operation, to establish a valid key path. You could also open up a key buffer window, enter a key value, and execute some get by key operation. Read Operations You can execute all the get and step operations from this menu. If you have a data buffer window open, its contents will be updated to reflect new records as they are read. The four operations, Get First, Get Last, Get Previous, and Get Next are also available on the status line. Get Position Will display the offset of the current record and add it to the history list of record offsets. 13 Get Direct Use Get Direct to read a record by position. You may type the record offset in the input line or press the history button to select from a list of saved record offsets. Output Menu Options Key Path This submenu displays a list of all possible key paths for a file. It is identical to the one in the Input menu. When a file is opened, the key path defaults to key one. If a file has more than one key defined, you can choose any key to use as the index for reading records. Insert Use this option to add a new record to a file. Admittedly, creating new records is not easy. Most likely, you will alter the keys and some data in an existing record, in a data buffer window, and then save as a new record. Update You can rewrite an existing record, using the same key values, with Update. Use a data buffer window to edit a record. Be careful when editing key fields, unless they were defined as modifiable you will get errors. Delete Delete removes the current record, the one held in the file data buffer (the same one as displayed in a data buffer window). If you have a key browse window open and select Delete, whatever record happened to be read last will be deleted. Be careful! Transactions If you have Btrieve configured correctly, you can play with transaction processing. While transactions are active a window with the message "TRANSACTIONS ON" will be visible. Locks Menu Options You can use the Locks menu to test Btrieve's record locking. The default option is No Locks. Choosing Unlock All Records will release all locks, including multiple record locks. Please refer to your Btrieve manual for more information about the different types of record locks. Window Menu Options This menu provides keyboard access to the functions for resizing, moving, zooming, and closing windows. All these functions are also available using hot key combinations or a mouse. 14 Misc Menu Options This menu contains the page size calculator and program setup options. Page Size Calculator Enter the number of bytes in the record and the number of duplicate keys. A dialog box will display the utilization percentage rates for each possible page size from 512 byte to 4096 bytes. The optimum page size will be displayed at the bottom of the dialog box. Colors BTRV is compatible with any monitor, color, monochrome, or LCD. Initially, BTRV will configure itself based on the type of monitor attached. If you have any problems try setting the color to one of the default sets described below. You may customize all color settings in BTRV. The colors are divided into several areas, including Windows, Menus, Dialog Boxes. Within each area the colors are further broken down into colors for the various screen objects such as Buttons and Scroll Bars. Default Colors There are three default color sets available, Color, Black and White, and Monochrome. You probably won't use this option unless you have some problems with your display. BTRV configures itself based on the display adapter found. If you have a portable or a black and white VGA, and the colors are not right, try selecting the Black and White default color set. Toggle Video Mode On computers equipped with EGA or VGA, you can use this to display more data on the screen. EGA can be toggled to 43 line mode and VGA to 50 line mode. Change Interrupt In some instances (mainly to avoid hardware conflicts) it is necessary to change the interrupt number that the Btrieve TSR is assigned. If you are using a version of Btrieve with a non-standard interrupt, you can configure BTRV for that new interrupt. The default interrupt is 123, the interrupt may be changed to any number from 0 through 255. Change Buffer Size When reading variable length records, the record size can (depending on the Btrieve version) be up to 64K bytes in length. To conserve memory BTRV uses a default size of 16384 bytes. If none of your variable length records are this big, or if they are bigger, you can change the size of the buffer. This will have no effect on memory use except for files with variable length records. 15 Save and Load Setup If you want to make any configuration changes permanent, just select Save from the menu. BTRV will write out a file named "BTRV.CFG", in the program directory, to store your new configuration. Use Load to manually restore settings stored in the configuration file. Each time you run BTRV the new configuration will be read from disk. 16 Appendix A - Hot Keys Below is a list of all short cut keys that can be used in the program: Menu Option Keys Function Open Ctrl-O Open a file Close Ctrl-C Close the current file Exit Alt-X Exit the program Get First Ctrl-Home Read first record in file Get Last Ctrl-End Read last record in file Get Previous Ctrl-P Read the previous record Get Next Ctrl-N Read the next record Get Equal Ctrl-E Read record with matching key Get Greater Than Ctrl-G Read record with key greater than Get Less Than Ctrl-L Read record with key less than Step Previous Alt-P Step to the previous record Step Next Alt-N Step to the next record Insert Ctrl-I Insert a new record Update Ctrl-U Update the current record Delete Ctrl-D Delete the current record Begin Transaction Alt-B Turn transaction processing ON Abort Transaction Alt-A Abort transaction processing End Transaction Alt-E Turn transaction processing OFF Statistics Alt-S View file statistics Data Buffer Alt-D View file data buffer Key Buffer Alt-K View file key buffer Btrieve Version Ctrl-V View the current Btrieve version Resize/Move Ctrl-F5 Resize or move current window Zoom F5 Zoom the current window Next F6 Move to next window Prev Shift-F6 Move to previous window Close F4 Close current window Tile F2 Tile all open windows Cascade F3 Cascade all open windows 17 Appendix B - Summary of Btrieve DOS Setup Options BTRIEVE /M: memory size /P: page size /T: transaction filename /I: pre-image file drive /C /B: pre-image buffer size /F: open files /L: multiple locks /E /O /U: compression buffer size /N: number of files in transaction /A MEMORY SIZE (/M) Defines total size of Btrieve's data area in K bytes. Default value is 32K, the range is 14K to 64K. PAGE SIZE (/P) Specifies the maximum page size of any file to be accessed. Must be a multiple of 512 bytes in the range 512 to 4096. TRANSACTION FILENAME (/T) Specifies the location for Btrieve to store the transaction control file. PRE-IMAGE FILE DRIVE (/I) Directs the pre-image files to a drive other than the drive where the Btrieve files are located. INDEX COMPACTION (/C) Tells Btrieve to perform index compaction on Update and Insert operations. PRE-IMAGE BUFFER SIZE (/B) Specifies the total amount of memory Btrieve should use for preimaging buffers. The default value is 16K, the range is 1K to 64K. OPEN FILES (/F) The maximum number of Btrieve files that can be open at one time. Default value is 20, the maximum value is 255. MULTIPLE LOCKS (/L) Sets the maximum number of multiple record locks per workstation. EXPANDED MEMORY (/E) With /E specified Btrieve will not use expanded memory. OVERRIDE CRITICAL ERROR (/O) Controls how Btrieve responds to DOS critical errors. With /O, Btrieve will return a status code an application. COMPRESSION BUFFER SIZE (/U) Allocates the length of the compression buffer. Range is 1K to 64K in one K byte increments. 18 FILES IN A TRANSACTION (/N) Sets the maximum number of files that can be accessed within a transaction. Default is 12, range is 1 to 18. ACTIVATE LOGGING (/A) When specified, Btrieve will record every operation that changes a file. Used with the rollback option in version 5.10. 19 ----------------end-of-author's-documentation--------------- Software Library Information: This disk copy provided as a service of Public (software) Library We are not the authors of this program, nor are we associated with the author in any way other than as a distributor of the program in accordance with the author's terms of distribution. Please direct shareware payments and specific questions about this program to the author of the program, whose name appears elsewhere in this documentation. If you have trouble getting in touch with the author, we will do whatever we can to help you with your questions. All programs have been tested and do run. To report problems, please use the form that is in the file PROBLEM.DOC on many of our disks or in other written for- mat with screen printouts, if possible. PsL cannot debug pro- programs over the telephone, though we can answer questions. Disks in the PsL are updated monthly, so if you did not get this disk directly from the PsL, you should be aware that the files in this set may no longer be the current versions. Also, if you got this disk from another vendor and are having prob- lems, be aware that some files may have become corrupted or lost by that vendor. Get a current, working disk from PsL. For a copy of the latest monthly software library newsletter and a list of the 4,000+ disks in the library, call or write Public (software) Library P.O.Box 35705 - F Houston, TX 77235-5705 1-800-2424-PSL MC/Visa/AmEx/Discover Outside of U.S. or in Texas or for general information, Call 1-713-524-6394